/*function ListNode(x){
    this.val = x;
    this.next = null;
}*/
function ReverseList(pHead)
{
    // write code here
    var ret = null 
    var cur = pHead
    while(cur){
      var temp = cur.next
      cur.next = ret
      ret = cur
      cur = temp
    }
    return ret
}
module.exports = {
    ReverseList : ReverseList
};